package com.hycgy.system.pojo;

/**
 * @author 罗老师
 * @Date 2025/5/28 10:06
 */
import java.time.LocalDateTime;

public class User {
    private Integer userId;  //用户编号
    private String accountName;  //账户名
    private String username;  //用户名
    private String password;  //密码
    private String emailaddress;  //邮件地址
    private Integer role;  //角色类型  1-管理员，2-普通用户
    private LocalDateTime createdat;  //创建时间
    private LocalDateTime updatedat;  //更新时间

    //无参构造函数
    public User() {
    }
    //全参构造函数
    public User(String accountName, String username, String password, String emailaddress, Integer role) {
        this.accountName = accountName;
        this.username = username;
        this.password = password;
        this.emailaddress = emailaddress;
        this.role = role;
    }

    //get和set方法
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmailaddress() {
        return emailaddress;
    }

    public void setEmailaddress(String emailaddress) {
        this.emailaddress = emailaddress;
    }

    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    public LocalDateTime getCreatedat() {
        return createdat;
    }

    public void setCreatedat(LocalDateTime createdat) {
        this.createdat = createdat;
    }

    public LocalDateTime getUpdatedat() {
        return updatedat;
    }

    public void setUpdatedat(LocalDateTime updatedat) {
        this.updatedat = updatedat;
    }

    //toString方法
    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", accountName='" + accountName + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", emailaddress='" + emailaddress + '\'' +
                ", role=" + role +
                ", createdat=" + createdat +
                ", updatedat=" + updatedat +
                '}';
    }
}
